<cp-navbar (onClickLeft)="onClickLeft()"></cp-navbar>
<div class="error" *ngIf="error"><cp-error (reload)="handleReload()"></cp-error></div>
<div class="loading" *ngIf="loading"><cp-loading></cp-loading></div>
<div class="container" *ngIf="!error && !loading">
  <div class="gutter"></div>
  <div class="common-cell">
    <div class="item border-bottom">
      <div class="left">头像</div>
      <div class="right" (click)="setAvatarAction()">
        <span class="value"> <img [src]="userinfo.Photo" class="avatar" /> </span> <i class="icon icon-right"></i>
      </div>
    </div>
    <div class="item border-bottom" (click)="handleModify('Nick')">
      <div class="left">昵称</div>
      <div class="right">
        <span class="value">{{ userinfo.Nick }}</span> <i class="icon icon-right"></i>
      </div>
    </div>
    <div class="item border-bottom" (click)="handleModify('Sex')">
      <div class="left">性别</div>
      <div class="right">
        <span class="value">{{ userinfo.Sex ? userinfo.Sex : '未设置' }}</span> <i class="icon icon-right"></i>
      </div>
    </div>
    <div class="item border-bottom">
      <div class="left">手机号码</div>
      <div class="right">
        <span class="value">{{ userinfo.Mobile | encryPhone }}</span>
      </div>
    </div>
    <div
      class="item item-code"
      routerLink="../qrcode"
      [queryParams]="{ Nick: userinfo.Nick, Captcha: userinfo.Captcha }"
    >
      <div class="left">我的二维码</div>
      <div class="right">
        <span class="value"> <i class="icon icon-qrcode1"></i> </span> <i class="icon icon-right"></i>
      </div>
    </div>
  </div>
</div>
